
import  type { App } from 'vue'
import BBqButton from "./component/button";
import BBqSwitch from "./component/switch"
import BBqMessage from "./component/message"
import {BBqCollapse,BBqCollapseItem} from "./component/collapse"
import {BBqRadio,BBqRadioBox} from "./component/radio"
import {BBqCheck,BBqCheckBox} from "./component/check"
import {BBqMenu,BBqMenuItem,BBqMenuSub} from "./component/menu"

const components = [
    BBqSwitch,
    BBqButton,
    BBqCollapse,
    BBqCollapseItem,
    BBqRadio,
    BBqRadioBox,
    BBqCheck,
    BBqCheckBox,
    BBqMenu,
    BBqMenuItem,
    BBqMenuSub
]
const plugins = [
    BBqMessage
]
const install = (app: App, opt: {}): void => {
    components.forEach(component => {
        let com:any = component
        app.component(com.name, component);
    });

    plugins.forEach(plugin => {
        app.use(plugin)
    });
}

export default {
    install
};

export {
    BBqSwitch,
    BBqButton,
    BBqMessage,
    BBqCollapse,
    BBqCollapseItem,
    BBqRadio,
    BBqRadioBox,
    BBqCheckBox,
    BBqCheck,
    BBqMenu,
    BBqMenuSub,
    BBqMenuItem
}